import {
  createRouter,
  createWebHashHistory,
  type RouteRecordRaw,
} from "vue-router";

import TabView from "../views/TabView.vue";
import LoginView from "../views/LoginView.vue";

import HeaderComp from "../components/HeaderComp.vue";
import FooterComp from "../components/FooterComp.vue";

const routes: RouteRecordRaw[] = [
  { path: "/", redirect: "/home" },
  {
    path: "/home",
    components: {
      default: TabView,
      header: HeaderComp,
      footer: FooterComp,
    },
  },
  {
    path: "/login",
    components: {
      default: LoginView,
      header: HeaderComp,
      footer: FooterComp,
    },
  },
];
const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
